//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { SmsConfig, SmsConfigResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooSmsConfigList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<SmsConfigResponse>(`/uctoo/sms_config/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooSmsConfig = async (id: string) => {
  return requestClient.get<SmsConfig>(`/uctoo/sms_config/${id}`);
};

export const adductooSmsConfig = async (data: Partial<SmsConfig>) => {
  return requestClient.post<SmsConfig>('/uctoo/sms_config/add', data);
};

export const edituctooSmsConfig = async (data: Partial<SmsConfig>) => {
  return requestClient.post<SmsConfig>('/uctoo/sms_config/edit', data);
};

export const deleteuctooSmsConfig = async (id: string) => {
  return requestClient.post<any>('/uctoo/sms_config/del', { id });
};
